import request from '@/utils/request'

// 查询申购/赎回管理列表
export function listFinancePurchase(query) {
  return request({
    url: '/loan/financePurchase/list',
    method: 'get',
    params: query
  })
}

// 查询申购/赎回管理详细
export function getFinancePurchase(financePurchaseId) {
  return request({
    url: '/loan/financePurchase/' + financePurchaseId,
    method: 'get'
  })
}

// 新增申购/赎回管理
export function addFinancePurchase(data) {
  return request({
    url: '/loan/financePurchase',
    method: 'post',
    data: data
  })
}

// 修改申购/赎回管理
export function updateFinancePurchase(data) {
  return request({
    url: '/loan/financePurchase',
    method: 'put',
    data: data
  })
}

// 删除申购/赎回管理
export function delFinancePurchase(financePurchaseId) {
  return request({
    url: '/loan/financePurchase/' + financePurchaseId,
    method: 'delete'
  })
}

// 保存
export function saveFinancePurchase(data) {
  return request({
    url: '/loan/financePurchase/save',
    method: 'post',
    data: data
  })
}
